﻿#region

using System.ComponentModel;
using HouseHoldBudget.Core.Infrastructure;

#endregion

namespace HouseHoldBudget.Infrastructure
{
    public class ResourceDisplayName : DisplayNameAttribute
    {
        #region Constructors

        public ResourceDisplayName(string resourceKey)
        {
            ResourceKey = resourceKey;
        }

        #endregion

        #region Instance Properties

        public override string DisplayName
        {
            get
            {
                return EngineContext.Current.Resolve<ILocalizationService>().GetResource(ResourceKey);
            }
        }

        public string ResourceKey { get; set; }

        #endregion
    }
}